package com.mt.mtbusinessmanagementsystem.service;

import com.github.pagehelper.PageInfo;
import com.mt.mtbusinessmanagementsystem.pojo.dto.*;
import com.mt.mtbusinessmanagementsystem.pojo.entity.*;
import com.mt.mtbusinessmanagementsystem.pojo.view.ProductsClassificationType;
import com.mt.mtbusinessmanagementsystem.utils.IsTrue;
import com.mt.mtbusinessmanagementsystem.utils.entry.Entry;
import com.mt.mtbusinessmanagementsystem.utils.product.level.FirstLevel;
import org.springframework.web.multipart.MultipartFile;

import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

public interface GeneralService {
    //员工登录
    IsTrue<LoginDTO> login(Employee employee);

    //增加部门
    IsTrue<String>  addDept(Dept dept);

    //删除部门
    IsTrue<String> delDept(Integer deptId);

    //分页查询部门表信息
    PageInfo<DeptDTO> deptInfoByList(Integer pageNumber, Integer pageSize);

    //根据部门id查员工
    ArrayList<Employee> employeeByDept(Integer deptId);

    // 添加员工信息
    IsTrue<String> addEmployee(EmployeeDTO employeeDTO);

    // 修改员工信息
    IsTrue<String> putEmployee(EmployeeDTO employeeDTO);

    // 删除员工信息
    IsTrue<String> deleteEmployee(EmployeeDTO employeeDTO);

    // 查询员工信息
    List<EmployeeDTO> queryEmployee(EmployeeDTO employeeDTO);

    //根据部门名查员工
    ArrayList<Employee> employeeByDeptName(String deptName);

    //修改员工头像
    String putEmployeeHead(String employeeId, MultipartFile headFile);

    //查询员工列表
    PageInfo<EmployeeDTO> queryEmployeeList(EmployeeDTO employeeDTO);

    //添加客户
    IsTrue<CustomerDTO> addCustomer(CustomerDTO customerDTO);

    //查询客户列表
    PageInfo<CustomerDTO> queryCustomerList(CustomerDTO customerDTO);

    //返回查询客户界面查询条件
    Entry<Entry<String, ArrayList<CustomerDTO>>, Entry<String, ArrayList<CustomerDTO>>> queryCreateAndResponsibleInfo();

    //修改客户
    void customerPut(Customer customer);

    //查看客户详细
    IsTrue<CustomerDTO> customerDetailedInfo(CustomerDTO customerDTO);

    //添加跟进方法
    IsTrue addFollowMethod(FollowMethod followMethod);

    //删除跟进方法
    IsTrue<String> delFollowMethod(Integer followMethodId);

    //修改跟进方法
    IsTrue<FollowMethod> updateFollowMethod(FollowMethod followMethod);

    //查询跟进方法
    ArrayList<FollowMethod> queryFollowMethod();

    //增加进展表
    IsTrue<String> addProgress(Integer followMethodsId, LocalDateTime dateTime, String progressInfo, MultipartFile[] fileList, String employeeId, String customerId);

    //查询进展表
    IsTrue<ArrayList<ProgressDTO>> queryProgressList(CustomerDTO customerDTO);

    //增加产品分类
    IsTrue<String> addProductClass(ProductsClassificationDTO productsClassificationDTO);

    //查询文件地址
    IsTrue<FileInfo> searchFileUrl(FileInfo fileInfo);

    //查询产品分类类型
    IsTrue<ArrayList<FirstLevel>> searchProductsClassificationType();

    //修改产品分类
    IsTrue<String> putProductsClassification(ProductsClassificationType productsClassificationType);

    //删除产品分类
    IsTrue<String> delProductsClassification(ProductsClassificationType productsClassificationType);

    //添加产品
    IsTrue<String> addProduct(ProductsDTO productsDTO);

    //修改产品
    IsTrue<String> putProduct(ProductsDTO productsDTO);

    //删除产品
    IsTrue<String> delProduct(ProductsDTO productsDTO);

    //查询产品
    IsTrue<PageInfo<ProductsDTO>> queryProduct(ProductsDTO productsDTO);

    //增加产品数量
    IsTrue<Products> addProductNumber(ProductsDTO productsDTO);

    //减少产品数量
    IsTrue<Products> decreaseProductNumber(ProductsDTO productsDTO);

    //添加订单
    IsTrue<String> addMtOrder(MTOrderDTO mtOrderDTO);

    //修改订单
    IsTrue<MTOrderDTO> putMtOrder(MTOrderDTO mtOrderDTO);

    //查询订单列表
    IsTrue<PageInfo<MTOrderDTO>> queryMtOrderList(MTOrderDTO mtOrderDTO);

    //添加卖家买家信息表
    IsTrue<String> addSellerInfo(SellerAndBuyerInfo sellerAndBuyerInfo);

    //删除卖家买家信息表
    IsTrue<String> deleteSellerInfo(Integer sellerInfoId);

    //查询卖家买家信息表
    IsTrue<List<SellerAndBuyerInfo>> querySellerInfoList(SellerAndBuyerInfo sellerAndBuyerInfo);

    //修改卖家买家信息表
    IsTrue<String> updateSellerInfo(SellerAndBuyerInfo sellerAndBuyerInfo);

    //根据员工姓名获取员工ID
    String getEmployeeIdByName(String employeeName);

    //修改部门
    IsTrue<String> updateDept(DeptDTO deptDTO);

}
